AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:Initialize()
	self.Entity:SetModel( self.DefaultModel )
	
	if self.Entity.DamageType == "normal" then
		self.Entity.Damage = 400
	else
		self.Entity.Damage = 800
	end
	
	self.Cooldown = 5
	self.EnergyDraw = 25
	self.ProjectileName = "projectile_curved_light"
	self.ProjectileSpeed = 2500
	self.BlastRadius = 180
	
	self.BaseClass.Initialize(self)
end

function ENT:DrawFireEffect()
	CDEffect_sprite_pulse(self.Entity:LocalToWorld(self.FireOrigin), self.Entity.Color, 200, 0.75, 0, self.Entity)
end

function Light_Arty_Duplicate(player, position, angles, DamageType, Color)
	local newentity = ents.Create("weapon_projectile_curved_light")
	newentity:SetPos(position)
	newentity:SetAngles(angles)
	newentity:SetPlayer(player)
	newentity.DamageType = DamageType
	newentity.Color = Color
	newentity:Spawn()
	return newentity
end

duplicator.RegisterEntityClass("weapon_projectile_curved_light", Light_Arty_Duplicate, "pos", "ang", "DamageType", "Color")